import request from '@/utils/request'

// 查询种植主体服务统计列表
export function listPlantService(query) {
  return request({
    url: '/statistics/plant_service/list',
    method: 'get',
    params: query
  })
}

/** 查询种植主体年度服务总计 */
export function listPlanterServiceSummary(query) {
  return request({
    url: '/statistics/plant_service/planterSummary',
    method: 'get',
    params: query
  })
}

/** 查询年度服务分类总计 */
export function listServiceTypeSummary(query) {
  return request({
    url: '/statistics/plant_service/serviceTypeSummary',
    method: 'get',
    params: query
  })
}

/** 查询月度服务分类总计 */
export function listServiceMonthlySummary(query) {
  return request({
    url: '/statistics/plant_service/serviceMonthlySummary',
    method: 'get',
    params: query
  })
}


// 查询种植主体服务统计详细
export function getPlantService(id) {
  return request({
    url: '/statistics/plant_service/' + id,
    method: 'get'
  })
}

// 新增种植主体服务统计
export function addPlantService(data) {
  return request({
    url: '/statistics/plant_service',
    method: 'post',
    data: data
  })
}

// 修改种植主体服务统计
export function updatePlantService(data) {
  return request({
    url: '/statistics/plant_service',
    method: 'put',
    data: data
  })
}

// 删除种植主体服务统计
export function delPlantService(id) {
  return request({
    url: '/statistics/plant_service/' + id,
    method: 'delete'
  })
}
